<?php

namespace App\Exports;

use App\Models\Task;
use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\Exportable;

class TaskExport implements FromQuery
{
    
	use Exportable;

    public function __construct(string $year)
    {
        $this->year = $year;
    }

    public function query()
    {
        return Task::query()->whereDate('created_at', $this->year);
    }
}
